package com.teichmann.engine;

import java.io.IOException;

import com.teichmann.core.OnlinePageJSoup;

public class OnlineExecutorJSoup implements Runnable {

	private OnlinePageJSoup[] pages = new OnlinePageJSoup[] { 
		//	new com.teichmann.core.targets.online.AutoCarroJSoup(),
			new com.teichmann.core.targets.online.SulRevendasJSoup()
	};
	private String parameter;

	
	public OnlineExecutorJSoup(String parameter) {
		this.parameter = parameter;
	}

	public void run() {
		try {
         long start = System.currentTimeMillis();
         new CarSearch(pages).process(parameter);
         
         System.out.println("Took "+ (System.currentTimeMillis()- start) +" ms.");
         
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static void main(String args[]) {
		(new Thread(new OnlineExecutorJSoup("astra"))).start();
	}

}
